package com.wtf.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * desc:
 *
 * @author tengfei wang
 * @version 1.0
 * @date Created in 3/11/2020
 */
@Component
@FeignClient(name = "service-code", path = "/code", fallback = CodeFeignFallBack.class)
public interface CodeFeignService {

    /**
     * 校验 code是否邮箱
     *
     * @param email 邮箱
     * @param code  code
     * @return 返回结果
     */
    @RequestMapping("/validate/{email}/{code}")
    public Integer validCode(@PathVariable("email") String email, @PathVariable("code") Integer code);
}
